<template>
    <div>
        <input type="checkbox" :checked="checked" @change="change"/>
    </div>
</template>

<script>
    export default {
        name: "MyCheckBox",
        model: {
            prop: 'checked',
            event: 'zhuangbi'
        },
        props: {
            checked: Boolean
        },
        methods: {
            change(e) {
                this.$emit('zhuangbi', e.target.checked)
            }
        }
    }
</script>

<style scoped>

</style>
